<?php
declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://doc.hyperf.io
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */
return [
    'default' => [
        'driver' => Hyperf\Nats\Driver\NatsDriver::class,
        //'encoder' => Hyperf\Nats\Encoders\JSONEncoder::class,
        'encoder' => App\Nats\RawEncoder::class,
        'timeout' => 10,
        'options' => [
            'host' => env('NATS_HOST', 'localhost'),
            'port' => env('NATS_PORT', '4222'),
            'user' => env('NATS_USER', 'nats'),
            'pass' => env('NATS_PASS', 'nats'),
            'lang' => 'php',
            'token' => env('NATS_TOKEN', 'nats'),
        ],
        'pool' => [
            'min_connections' => 1,
            'max_connections' => 20,
            'connect_timeout' => 30.0,
            'wait_timeout' => 5.0,
            'heartbeat' => -1,
            'max_idle_time' => 60,
        ],
        'concurrent' => [
            'limit' => 2000,
        ],
    ],
];